#include<iostream.h>

class Runga_Kutta{

 private:
     double x,y ; // value points
     double h;    // step size
     double initialY0 ; //initial value of y(0) 
      

 public:
 
    //This is default Contructor, this will set the interval over [0,3]
     Runga_Kutta();
     
    //This is parameterized constructor
    // this will set the interval as passed as parameter [a,b]
     Runga_Kutta(double , double);
     
     
    // This method will set the value of X passed as parameter     
     void setX(const double);
    // This method will return the value of x 
    const double getX();
    // This method will set the value of y passed as paramter 
     void setY(const double);
    // This method will return the value of y  
     const double getY();
     
    // This method will set the value of h passed as parameter
    // h is the step size  
     void setH(const double);
    // This method will return the value of h 
     const double getH();
     
    // This method will set the initial value of y(0) passed as parameter
     void setInitialY0(const double);
    // This method will return the initial value of y(0)  
     const double getInitialY0();
     
    // This method is used  to calculate the value of fuction for two values (x,y) passed as parameter  
     const double getF(double , double);  

};


  Runga_Kutta::Runga_Kutta(){

    x=0;
    y=3;
  }
  
  
  Runga_Kutta::Runga_Kutta(double x,double y){
  
    this->x=x;
    this->y=y;
    
  }
  
  
 void Runga_Kutta::setX(const double x){
  
    this->x=x;
 } 
 
 
 const double Runga_Kutta::getX(){
 
   return x;
 }
 
 
 void Runga_Kutta::setY(const double y){
 
    this->y=y;
 } 
 
 const double Runga_Kutta::getY(){
 
    return y;
 }
 
 
 void Runga_Kutta::setH(const double h){
  
   this->h=h;
 }
 
 
 const double Runga_Kutta::getH(){
 
   return h;
 }
 
 
 void Runga_Kutta::setInitialY0(const double initialY0){
 
     this->initialY0 = initialY0;
 }
 
 
 const double Runga_Kutta::getInitialY0(){
 
    return initialY0;
 }
 
 const double Runga_Kutta::getF(double x1, double y1){
 
    return ( - 2 * x1 * y1 );
    
    //return ( ( x1 - y1 ) / 2 );
    
    
 }

 